{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { cloneElement } from '../_util/reactNode';\nimport SingleNumber from './SingleNumber';\nvar ScrollNumber = function ScrollNumber(_a) {\n  var customizePrefixCls = _a.prefixCls,\n    count = _a.count,\n    className = _a.className,\n    motionClassName = _a.motionClassName,\n    style = _a.style,\n    title = _a.title,\n    show = _a.show,\n    _a$component = _a.component,\n    component = _a$component === void 0 ? 'sup' : _a$component,\n    children = _a.children,\n    restProps = __rest(_a, [\"prefixCls\", \"count\", \"className\", \"motionClassName\", \"style\", \"title\", \"show\", \"component\", \"children\"]);\n  var _React$useContext = React.useContext(ConfigContext),\n    getPrefixCls = _React$useContext.getPrefixCls;\n  var prefixCls = getPrefixCls('scroll-number', customizePrefixCls);\n  // ============================ Render ============================\n  var newProps = Object.assign(Object.assign({}, restProps), {\n    'data-show': show,\n    style: style,\n    className: classNames(prefixCls, className, motionClassName),\n    title: title\n  });\n  // Only integer need motion\n  var numberNodes = count;\n  if (count && Number(count) % 1 === 0) {\n    var numberList = String(count).split('');\n    numberNodes = numberList.map(function (num, i) {\n      return /*#__PURE__*/React.createElement(SingleNumber, {\n        prefixCls: prefixCls,\n        count: Number(count),\n        value: num,\n        // eslint-disable-next-line react/no-array-index-key\n        key: numberList.length - i\n      });\n    });\n  }\n  // allow specify the border\n  // mock border-color by box-shadow for compatible with old usage:\n  // <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />\n  if (style && style.borderColor) {\n    newProps.style = Object.assign(Object.assign({}, style), {\n      boxShadow: \"0 0 0 1px \".concat(style.borderColor, \" inset\")\n    });\n  }\n  if (children) {\n    return cloneElement(children, function (oriProps) {\n      return {\n        className: classNames(\"\".concat(prefixCls, \"-custom-component\"), oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)\n      };\n    });\n  }\n  return /*#__PURE__*/React.createElement(component, newProps, numberNodes);\n};\nexport default ScrollNumber;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","classNames","React","ConfigContext","cloneElement","SingleNumber","ScrollNumber","_a","customizePrefixCls","prefixCls","count","className","motionClassName","style","title","show","component","children","restProps","useContext","getPrefixCls","newProps","assign","numberNodes","Number","numberList","String","split","map","num","createElement","value","key","borderColor","boxShadow","oriProps"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/badge/ScrollNumber.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { cloneElement } from '../_util/reactNode';\nimport SingleNumber from './SingleNumber';\nconst ScrollNumber = _a => {\n  var {\n      prefixCls: customizePrefixCls,\n      count,\n      className,\n      motionClassName,\n      style,\n      title,\n      show,\n      component = 'sup',\n      children\n    } = _a,\n    restProps = __rest(_a, [\"prefixCls\", \"count\", \"className\", \"motionClassName\", \"style\", \"title\", \"show\", \"component\", \"children\"]);\n  const {\n    getPrefixCls\n  } = React.useContext(ConfigContext);\n  const prefixCls = getPrefixCls('scroll-number', customizePrefixCls);\n  // ============================ Render ============================\n  const newProps = Object.assign(Object.assign({}, restProps), {\n    'data-show': show,\n    style,\n    className: classNames(prefixCls, className, motionClassName),\n    title: title\n  });\n  // Only integer need motion\n  let numberNodes = count;\n  if (count && Number(count) % 1 === 0) {\n    const numberList = String(count).split('');\n    numberNodes = numberList.map((num, i) => /*#__PURE__*/React.createElement(SingleNumber, {\n      prefixCls: prefixCls,\n      count: Number(count),\n      value: num,\n      // eslint-disable-next-line react/no-array-index-key\n      key: numberList.length - i\n    }));\n  }\n  // allow specify the border\n  // mock border-color by box-shadow for compatible with old usage:\n  // <Badge count={4} style={{ backgroundColor: '#fff', color: '#999', borderColor: '#d9d9d9' }} />\n  if (style && style.borderColor) {\n    newProps.style = Object.assign(Object.assign({}, style), {\n      boxShadow: `0 0 0 1px ${style.borderColor} inset`\n    });\n  }\n  if (children) {\n    return cloneElement(children, oriProps => ({\n      className: classNames(`${prefixCls}-custom-component`, oriProps === null || oriProps === void 0 ? void 0 : oriProps.className, motionClassName)\n    }));\n  }\n  return /*#__PURE__*/React.createElement(component, newProps, numberNodes);\n};\nexport default ScrollNumber;"],"mappings":"AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC;IAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAAC;EACjG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAA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